package com.wjc.train.business.controller;

import com.wjc.train.business.req.SeatSellReq;
import com.wjc.train.business.resp.SeatSellResp;
import com.wjc.train.business.service.IDailyTrainSeatService;
import com.wjc.train.common.resp.CommonResp;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 余票信息 前端控制器
 * </p>
 *
 * @author Guessed
 * @since 2023-08-14
 */
@RestController
@Validated
@RequestMapping("/seat-sell")
public class WebSeatSellController {

    @Resource
    private IDailyTrainSeatService dailyTrainSeatService;

    @PostMapping("/query")
    public CommonResp query(@RequestBody SeatSellReq req){
        List<SeatSellResp> list = dailyTrainSeatService.querySeatSell(req);
        return CommonResp.success(list);
    }


}


